unit config;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, DB, Mask, DBCtrls, DBTables, Buttons;

type
  TFormConfig = class(TForm)
    BitBtn1: TBitBtn;
    Bevel1: TBevel;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    BitBtn4: TBitBtn;
    BitBtn5: TBitBtn;
    BitBtn6: TBitBtn;
    BitBtn7: TBitBtn;
    BitBtnTamanhos: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
    procedure BitBtn3Click(Sender: TObject);
    procedure BitBtn4Click(Sender: TObject);
    procedure BitBtn5Click(Sender: TObject);
    procedure BitBtn6Click(Sender: TObject);
    procedure BitBtn7Click(Sender: TObject);
    procedure BitBtnTamanhosClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormConfig: TFormConfig;
  sql:string;

implementation

uses Principal, Parametros, CadObs, Operadores, Entregador, TaxaEntrega,
  Familia, TamanhoProduto;

{$R *.dfm}

procedure TFormConfig.BitBtn1Click(Sender: TObject);
begin
    self.close;
end;

procedure TFormConfig.BitBtn2Click(Sender: TObject);
begin
    if assigned(FormParametros) then
       FormParametros := nil;
    FormParametros := TFormParametros.Create(Self);
    FormParametros.ShowModal;
end;

procedure TFormConfig.BitBtn3Click(Sender: TObject);
begin
    if assigned(FormCadObs) then
       FormCadObs := nil;
    FormCadObs := TFormCadObs.Create(Self);
    FormCadObs.ShowModal;
end;

procedure TFormConfig.BitBtn4Click(Sender: TObject);
begin
     if assigned(FormOperadores) then
           FormOperadores := nil;
     FormOperadores := TFormOperadores.Create(Self);
     FormOperadores.ShowModal;
end;

procedure TFormConfig.BitBtn5Click(Sender: TObject);
begin
    if assigned(FormEntregador) then
       FormEntregador := nil;
    FormEntregador := TFormEntregador.Create(Self);
    FormEntregador.ShowModal;
end;

procedure TFormConfig.BitBtn6Click(Sender: TObject);
begin
    if assigned(FormTaxaEntrega) then
       FormTaxaEntrega := nil;
    FormTaxaEntrega := TFormTaxaEntrega.Create(Self);
    FormTaxaEntrega.ShowModal;
end;

procedure TFormConfig.BitBtn7Click(Sender: TObject);
begin
    if assigned(FormFamilia) then
       FormFamilia := nil;
    FormFamilia := TFormFamilia.Create(Self);
    FormFamilia.ShowModal;
end;

procedure TFormConfig.BitBtnTamanhosClick(Sender: TObject);
begin
  if assigned(FormTamanhoProduto) then
       FormTamanhoProduto := nil;
    FormTamanhoProduto := TFormTamanhoProduto.Create(Self);
    FormTamanhoProduto.ShowModal;
end;

end.
